package xyz.csmcool.imutil.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * @author 什锦
 * @Package xyz.csmcool.imchat.entity
 * @since 2022/8/14 14:44
 */
@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class Message<T> implements Serializable {

    private static final long serialVersionUID = 1L;

    private Integer type;

    private Integer roomId;

    private Integer senderId;

    private String senderAvatar;

    private String senderName;

    private T message;

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;
}
